package com.gang.blog.dao;

import javax.annotation.Resource;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;


public class DaoSupport implements DAO {
	
	private SqlSessionTemplate sqlSessionTemplate;
	
	public Object save(String str, Object obj) throws Exception {
		return sqlSessionTemplate.insert(str, obj);
	}

	public Object update(String str, Object obj) throws Exception {
		return sqlSessionTemplate.update(str, obj);
	}

	public Object delete(String str, Object obj) throws Exception {
		return sqlSessionTemplate.delete(str,obj);
	}

	public Object findForObject(String str, Object obj) throws Exception {
		return sqlSessionTemplate.selectList(str, obj);
	}

	public Object findForList(String str, Object obj) throws Exception {
		return sqlSessionTemplate.selectList(str, obj);
	}

	public Object findForMap(String sql, Object obj, String key, String value) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

}
